/* 
    按钮权限
*/

import { defineStore } from 'pinia';

const permissions = defineStore('permissions', {
    state: () => {
        return {
            permissions: [] as string[]
        }
    },
    getters: {
        hasPer: (state) => {
            return (permission: string) => state.permissions.includes(permission)
        }
    }
})

export default permissions